import {
  Controller,
  Get,
  UseGuards,
  UseInterceptors,
  UsePipes,
  UseFilters,
  Query,
} from '@nestjs/common';
import { AopService } from './aop.service';
import { LoginGuard } from 'src/guard/login.guard';
import { TimeInterceptor } from 'src/interceptor/time.interceptor';
import { ValidatePipe } from 'src/pipe/validate.pipe';
import { TestFilter } from 'src/filter/test.filter';

@Controller('api/aop')
// @UseInterceptors(TimeInterceptor)
// @UsePipes(ValidatePipe)
export class AopController {
  constructor(private readonly aopService: AopService) {}

  @Get('partAopTest')
  // @UseGuards(LoginGuard)
  // @UseInterceptors(TimeInterceptor)
  // @UseFilters(TestFilter)
  partAopTest(@Query('num', ValidatePipe) num: number): number {
    return num + 1;
  }
}
